<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 44、66、7、a、h、8、99
        Promise.resolve().then(() => {
            // #1
            Promise.resolve().then(r => {
                // #2
                console.log('a');
                // return Promise.resolve(undefined)
            }).then(r => {
                // #4
                console.log('h');
            }).then(r => {
                // #6
                console.log('8');
            }).then(r => {
                // #8
                console.log('99')
            });
            // return Promise.resolve(undefined)
        }).then(r => {
            // #3
            console.log('44');
        }).then(() => {
            // #5
            console.log('66')
        }).then(() => {
            // #7
            console.log('7')
        })
    </script>
</body>

</html>